package com.uzai.console.mapper;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.user.usertypegroup.UserTypeGroupQuery;
import com.uzai.console.entity.LadderRatioGroup;
import com.uzai.console.entity.UserTypeGroup;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface UserTypeGroupMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(UserTypeGroup record);

    UserTypeGroup selectById(@Param("id") Long id, @Param("merId") Long merId);

    //验证重名
    UserTypeGroup selectByName(@Param("merId") Long merId, @Param("name") String name);

    int update(UserTypeGroup record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<UserTypeGroup> findByList(Page<UserTypeGroup> page, @Param("query") UserTypeGroupQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<UserTypeGroup> findByList(@Param("query") UserTypeGroupQuery query);
}